package com.zh.security.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;

/**
 * @Description:
 * @ClassName HelloController
 * @date: 2021.10.16 19:57
 * @Author: zhanghang
 */
@RestController
public class HelloController {

	@GetMapping("/hello")
	public String hello(HttpServletRequest request){
		String token = request.getHeader("token");
		System.out.println(token);
		return "hello spring security";
	}
}
